import 'package:lovify/core/network/file_service.dart';
import 'package:lovify/core/network/model/response_entity.dart';
import 'package:lovify/core/utils/image.dart';
import 'package:lovify/state/base_controller.dart';

class RelationshipController extends BaseController {
  final FileService _fs = FileService();

  Future<String?> decodeQRCode() async {
    var imgFile = await ImageUtils.pickImageFromCamera();
    if (imgFile != null) {
      ResponseEntity<String> result = await _fs.decode(imgFile);
      checkResponse(result);
      return result.data;
    }
    return null;
  }
}
